package com.shiro.controller;

import com.shiro.service.RolePrimissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/demo")
public class TestCotroller {
    @Autowired
    RolePrimissionService rolePrimissionService;
    @RequestMapping("/thymeleaf")
    public String thymeleaf(Model model){
        model.addAttribute("name","admin");
        return "hello";
    }

    @RequestMapping("/addRole")
    public String addRole(Model model){
        rolePrimissionService.add(2,14);
        return "hello";
    }
}
